/* profil.css — styles spécifiques à la page profil */

body.profil-page {
  background: var(--fu-graphite);
  color: var(--fu-silver);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.fu-navbar__profile-link img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--fu-border);
  display:inline-block;
}

/* Carte avatar */
#avatarImg { border: 2px solid rgba(0,255,255,0.06); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }

/* boutons petits dans la page profil */
.profil-page .fu-btn { padding:8px 10px; border-radius:8px; font-size:0.95rem; }

/* carte principale droite */
.profil-page .fu-card { padding:14px; }

.profil-main{
  max-width: 980px;
  margin: 26px auto 0;
}

.profil-grid{
  gap: 18px;
  align-items: start;
}

.profil-card{
  padding: 18px;
}

@media (max-width: 820px){

  /* 1 colonne */
  .profil-grid{
    grid-template-columns: 1fr !important;
  }

  /* largeur commune infos + historique */
  .profil-page .fu-card{
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .profil-history{
    min-height: auto;
  }
}

/* Icône profil dans le header */
.fu-navbar__profile-link img{
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--fu-border);
  display:inline-block;
}

/* Page profil : quelques détails */
body.profil-page{
  background: var(--fu-graphite);
  color: var(--fu-silver);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.profil-page .fu-card{ padding:14px; }
#avatarImg{ border: 2px solid rgba(0,255,255,.06); box-shadow: 0 6px 18px rgba(0,0,0,.4); }

/* Mobile */
@media (max-width: 820px){
  .fu-grid-3{ grid-template-columns: 1fr !important; }
  #avatarImg{ width:120px; height:120px; }
  .fu-navbar__profile-link img{ width:36px; height:36px; }
}

/* Bloc pseudo : empilé verticalement */
.profile-pseudo{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-top: 6px;
}
.profile-pseudo input{
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--fu-border);
  background: transparent;
  color: var(--fu-silver);
  font: inherit;
}
.profile-pseudo .fu-btn{
  padding: 10px 12px;
  align-self: center;
}

/* Option : resserrer léger sur mobile */
@media (max-width: 820px){
  .profile-pseudo{ gap: 6px; }
  .profile-pseudo input{ padding: 9px; }
  .profile-pseudo .fu-btn{ padding: 9px 12px; }
}

/* Styles extracted from inline attributes in pages/profil.html */
.profil-main .fu-grid-3 {
  gap: 18px;
  align-items: start;
}

.profil-main aside.fu-card {
  padding: 18px 18px 4px;
}

.profil-main aside > div {
  text-align: center;
}

#avatarWrap {
  margin-bottom: 12px;
}

#avatarImg {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 0 auto 8px;
}

#avatarFile { display: none; }

#changeAvatarBtn { padding: 8px 12px; }

.profil-main .fu-card__title { margin-top: 14px; }
#changePlanBtn { margin-top: 6px; }

.profil-main hr { margin: 14px 0; border-color: var(--fu-border); }
#openSessionsBtn { margin-top: 8px; }

/* Avatar cliquable */
#avatarImg{
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease;
  transform-origin: center;
}

#avatarImg:hover{
  transform: scale(1.05);
  filter: brightness(1.05);
}

#avatarImg:active{
  transform: scale(1.02);
}

.profil-main section { min-height: auto; }
.profil-main .fu-animate-in { margin-top: 10px; }

.profil-main h4.fu-card__title { font-size: 1rem; }
.profil-main h5.fu-card__title { font-size: 0.95rem; margin-top: 8px; }

canvas[id^="chart_"] { width: 100%; background: transparent; }

#empty_pushup, #empty_squat, #empty_plank { display: none; margin-top: 6px; text-align: center; }

#videos_pushup, #videos_squat, #videos_plank { list-style: none; padding-left: 0; margin: 6px 0 0; }

/* Sessions list card added by JS */
.saved-session {
  border: 1px solid var(--fu-border);
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.session-action-wrap { margin-top: 6px; }

/* Ajustements : centrage bouton Enregistrer et marge du logout */
.profil-logout {
  margin-top: 6px;
  margin-bottom: 4px;
  text-align: center;
}
.profil-logout .fu-btn {
  margin: 0;
  display: inline-block;
}

/* ===== FU Chart Tooltip (bulle à côté du point) ===== */
#fuChartPopupOverlay {
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: 260px;
  background: #2b2b2b;
  border: 2px solid rgba(0,255,255,0.75);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  padding: 12px 36px 12px 12px;
  color: #E6E6E6;
  font-family: Arial, sans-serif;
}

#fuChartPopupBody {
  font-size: 14px;
  line-height: 1.35;
}

#fuChartPopupClose {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #E6E6E6;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

#fuChartPopupClose:hover {
  color: #00FFFF;
}

#fuChartPopupArrow {
  position: absolute;
  width: 0;
  height: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}

/* Flèche vers le bas (bulle au-dessus du point) */
#fuChartPopupOverlay.is-top #fuChartPopupArrow {
  bottom: -10px;
  border-top: 10px solid rgba(0,255,255,0.75);
}

#fuChartPopupOverlay.is-top #fuChartPopupArrow::after {
  content: "";
  position: absolute;
  left: -9px;
  top: -10px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #2b2b2b;
}

/* Flèche vers le haut (bulle en dessous du point) */
#fuChartPopupOverlay.is-bottom #fuChartPopupArrow {
  top: -10px;
  border-bottom: 10px solid rgba(0,255,255,0.75);
}

#fuChartPopupOverlay.is-bottom #fuChartPopupArrow::after {
  content: "";
  position: absolute;
  left: -9px;
  bottom: -10px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #2b2b2b;
}
